using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using GameFrameWork.Event;
using System.Reflection;
using GameFrameWork;
using UnityEngine.EventSystems;

public class GameMonoBehaviour : UIBehaviour
{
    [SerializeField]
    private string m_GameMonoBehaviourName;

    public string GameMonoBehaviourName { get => m_GameMonoBehaviourName; set => m_GameMonoBehaviourName = value; }

    protected GameMonoBehaviour UIFormLogic
    {
        get;
        private set;
    }

    private bool m_IsInited = false;

#if UNITY_EDITOR

    protected virtual void OnValidate()
    {
        if (m_GameMonoBehaviourName.IsNullOrEmpty())
        {
            m_GameMonoBehaviourName = GetType().Name;
        }
    }

#endif

    private void Awake()
    {
        InitBehaviour();
    }

    public void InitBehaviour()
    {
        if (m_IsInited)
            return;
        m_IsInited = true;
        var form = GetComponentInParent<UGUIForm>();
        OnAwake();
    }

    protected virtual void OnAwake()
    {

    }

    protected virtual void Start()
    {
    }


    protected override void OnEnable()
    {
        base.OnEnable();
    }

    protected override void OnDisable()
    {
        base.OnDisable();
    }



}